<template>
  <el-scrollbar
    class="ui-portal-right"
    style="
      width: 378px;
      position: absolute;
      right: 8px;
      top: 15px;
      bottom: 56px;
      z-index: 1;
      height: calc(89%);
    "
    v-if="visible"
  >
    <el-card
      class="ui-card"
      style="
        --el-card-padding: 8px;
        margin-top: 8px;
        background: linear-gradient(
          180deg,
          rgba(8, 40, 75, 0.45) 0%,
          rgba(10, 41, 73, 0.45) 15.35%,
          rgba(11, 70, 146, 0.45) 35.16%,
          rgba(11, 78, 167, 0.45) 62.46%,
          rgba(11, 30, 60, 0.45) 83.98%,
          rgba(13, 33, 58, 0.45) 100%
        );
        border: 1px solid rgba(111, 175, 247, 0.5);
        border-radius: 0;
        color: #fff;
      "
      body-style="height:300px;"
    >
      <template #header>
        <div class="card-header">
          <span
            style="
              display: inline-block;
              margin-right: 5px;
              width: 14px;
              height: 14px;
              background: no-repeat
                url()
                center;
              background-size: cover;
            "
          ></span>
          <span>网格基本信息</span>
        </div>
      </template>

      <GridBasicInfo />
    </el-card>

    <el-card
      class="ui-card"
      style="
        --el-card-padding: 8px;
        margin-top: 8px;
        background: linear-gradient(
          180deg,
          rgba(8, 40, 75, 0.45) 0%,
          rgba(10, 41, 73, 0.45) 15.35%,
          rgba(11, 70, 146, 0.45) 35.16%,
          rgba(11, 78, 167, 0.45) 62.46%,
          rgba(11, 30, 60, 0.45) 83.98%,
          rgba(13, 33, 58, 0.45) 100%
        );
        border: 1px solid rgba(111, 175, 247, 0.5);
        border-radius: 0;
        color: #fff;
      "
      body-style="height:300px;"
    >
      <template #header>
        <div class="card-header">
          <span
            style="
              display: inline-block;
              margin-right: 5px;
              width: 14px;
              height: 14px;
              background: no-repeat
                url()
                center;
              background-size: cover;
            "
          ></span>
          <span>冲突风险</span>
        </div>
      </template>
      <ConflictRisk />
    </el-card>

    <el-card
      class="ui-card"
      style="
        --el-card-padding: 8px;
        margin-top: 8px;
        background: linear-gradient(
          180deg,
          rgba(8, 40, 75, 0.45) 0%,
          rgba(10, 41, 73, 0.45) 15.35%,
          rgba(11, 70, 146, 0.45) 35.16%,
          rgba(11, 78, 167, 0.45) 62.46%,
          rgba(11, 30, 60, 0.45) 83.98%,
          rgba(13, 33, 58, 0.45) 100%
        );
        border: 1px solid rgba(111, 175, 247, 0.5);
        border-radius: 0;
        color: #fff;
      "
      body-style="height:300px;"
    >
      <template #header>
        <div class="card-header">
          <span
            style="
              display: inline-block;
              margin-right: 5px;
              width: 14px;
              height: 14px;
              background: no-repeat
                url()
                center;
              background-size: cover;
            "
          ></span>
          <span>态势监视</span>
        </div>
      </template>
      <SituationalAwareness />
    </el-card>
  </el-scrollbar>
</template>

<script setup>
import { toRefs } from "vue";

import GridBasicInfo from "./GridBasicInfo.vue";
import ConflictRisk from "./ConflictRisk.vue";
import SituationalAwareness from "./SituationalAwareness.vue";

const props = defineProps({
  visible: Boolean,
});

const { visible } = toRefs(props);
</script>

<style lang="less">
.ui-card {
  :deep(.el-card__header) {
    background: no-repeat url("@assets/stat/header-bg.png") center;
    background-size: cover;
  }
}
</style>

